﻿using SuperX.Helper.DataUtil;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

namespace SuperX.Helper.NOPI
{
    public class UpLoadFileInfo
    {
        /// <summary>
        /// 上传名称
        /// </summary>
        public string UploadName { get; set; }

        /// <summary>
        /// 本地文件全称
        /// </summary>
        public string LocalFileName { get; set; }

        /// <summary>
        /// 文件后缀
        /// </summary>
        public string Ends
        {
            get => Path.GetExtension(UploadName);
        }

        /// <summary>
        /// 文件的MD5
        /// </summary>
        public string SHA256File
        {
            get => FileMD5.SHA256File(LocalFileName);
        }
    }
}